VMSify is a sample STREAMS module that actually does something useful (well, noticable). VMSify is largely derived from the StreamNOP source, but it is extended to demonstrate simple address detection and data munging.
VMSify's functionality is relatively silly. It detects whether the stream is a telnet session (looking for outgoing connections on port 23) and, if it is, upper cases all the data returned from the server. The upshot is that if you install the software and log into a UNIX machine using a Mac OS telnet application, all the returned text is in upper case, just like it would be if you were logging into a VMS machine.
Packing List
The VMSify package contains the following items:
• Read Me — This document.
• VMSify.mcp — A project with debug and non-debug targets.
• VMSifyDebug.prefix — A prefix file used when building the debug version.
• VMSify.c — C source code to the module.
• VMSify — A compiled version of the non-debug target.
• VMSify Debug — A compiled version of the debug target.
Installation and Execution
To test the sample, do the following:
1. Drag the “VMSify” module into your Extensions folder.
2. Install a copy of the “OT AutoPush Support” into your Extensions folder. You may already have it installed (various product install it for you); if not, get it from the Open Transport 2.0.1 (or higher) SDK. You can get that by following the links from the OT web site.
<http://developer.apple.com/macos/opentransport/>
3. Open “OT AutoPush Support” with your preferred resource editing tool and add the string “VMSify” to the 'STR#' ID=128 resource.
4. Restart your computer.
5. Launch your favourite Mac OS telnet application (it works equally well for OT-native telnet applications and telnet applications which use the MacTCP API) and log into your favourite UNIX machine. Notice how everything appears in upper case. VMS is the future!
Building the Sample
This sample was built using the Metrowerks CodeWarrior Pro 2 environment with Universal Interfaces 3.3.1 interfaces and libraries.
To rebuild the sample, open the project file, select the VMSify (or VMSify Debug) target and choose Make from the Project menu.
Credits and Version History
If you find any problems with this sample, mail <DTS@apple.com> and I’ll try to fix them up.
Version 1.0b1 (Apr 1999) is the first release.
Version 1.0.1b1 (May 2000) is a minor update to fix a bug where I mixed up the semantics of dupb and copyb [2467966]. I also update the sample to build with the OT headers from Universal Interfaces 3.3.1.